import request from '@/utils/request'
//获取博客信息
export function getBlogInfo() {
  return request({
    url: `/`,
    method: "get"
  })
}
//访问量
export function report() {
  return request({
    url: `/report`,
    method: "post"
  })
}
//热门文章
export function articleList(query) {
  return request({
    url: `/articles`,
    method: "get",
    params: query
  })
}
//通过id获取文章
export function getArticleById(path) {
  return request({
    url: path,
    method: "get",
  })
}
//分类
export function categoryList() {
  return request({
    url: `/categories`,
    method: "get",
  })
}
//标签
export function tagList() {
  return request({
    url: `/tags`,
    method: "get",
  })
}
//首页说说列表
export function talkHomeList() {
  return request({
    url: `/home/talks`,
    method: "get",
  })
}
//说说分页列表
export function talkList(params) {
  return request({
    url: `/talks`,
    method: "get",
    params: params
  })
}
//根据 id 获取说说
export function getTalkById(id) {
  return request({
    url: `/talk/${id}`,
    method: "get",
  })
}
//条件查询文章
export function articleCondition(params) {
  return request({
    url: `/articles/condition`,
    method: "get",
    params: params
  })
}
//搜索文章
export function articleSearch(condition) {
  return request({
    url: `/articles/search`,
    method: "get",
    params: condition
  })
}
//查询文章归档
export function archiveList(condition) {
  return request({
    url: `/articles/archives`,
    method: "get",
    params: condition
  })
}
//友链
export function linkList() {
  return request({
    url: `/links`,
    method: "get",
  })
}
//相册
export function albumList() {
  return request({
    url: `/albums`,
    method: "get",
  })
}
//相册带有图片
export function albumPhotoList(id,query) {
  return request({
    url: `/albums/${id}/photos`,
    method: "get",
    params: query
  })
}
